# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=gsocket
pkgver=1.4.40
pkgrel=1
pkgdesc='Global Socket moving data from here to there securely, fast and trough NAT/Firewalls'
url='https://www.gsocket.io/'
arch=('loong64' 'x86_64')
license=('custom')
depends=('glibc' 'bash' 'openssl' 'rsync' 'sshfs' 'openssh' 'grep' 'binutils' 'coreutils')
source=("https://github.com/hackerschoice/gsocket/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('6fc20a9b6efdf03ee48492590d55571e2ddede056b13c214114d4c34c62ff1eceff03a7aac8b46e4bed172bf8c20229dd8c3cecaeb6833ada3d5f9a4ed6eb7a5')
b2sums=('36e8d0bff2fd1c1ad7c6b8cc0bef551c4c9d9bcdc856cb0ebb14285182a4652d07200e8ea54766d8f7f14433745fb35921a47d1e728518cdf97953451e8b3118')

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
